package com.tangyuan.controller;

import com.tangyuan.common.result.Result;
import com.tangyuan.feignapis.user.IUserLikeFeignClient;
import com.tangyuan.manager.AutoManager;
import com.xxl.job.core.handler.annotation.XxlJob;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;


/**
 * <p>
 * 前端控制器
 * </p>
 *
 * @author 小梁
 * @since 2020-12-03
 */
@RestController
@RequestMapping("/recommend")
public class UserLikeController {

    @Autowired
    private IUserLikeFeignClient userLikeFeignClient;


    @ApiOperation("注册开辟记录")
    @GetMapping("/register/{id}")
    public Result<String> register(@PathVariable("id") int id) {
        return userLikeFeignClient.getRegisterById(id);
    }
    /**
     * /user-like/regis
     * 注册用户Like表
     *
     * @date 16:31
     */
    @PostMapping("/regis")
    public Result regis(@RequestParam Long id) {
        return userLikeFeignClient.getRegis(id);
    }



}

